<script id="list-tpl" type="text/html"
        data-params='{"url":"/education/admin/category","dataName":"categoryData","pageid":"#page", "method":"post"}'>
    <table id="example" class="layui-table lay-even" data-name="categoryData" data-tplid="list-tpl">
        <thead>
            <tr>
                <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                                      lay-skin="primary"></th>
                <th>编号</th>
                <th>名称</th>
                <th>图标</th>
                <th>状态</th>
                <th width="80">排序
                    <div class="order-box">
                    <a href="javascript:;" class="sort" data-filed="id" data-asc="true"><i class="iconfont" >&#xe615;</i></a>
                    <a href="javascript:;" class="sort down" data-filed="id"><i class="iconfont">&#xe647;</i></a>
                    </div>
                </th>
                <th width="150">创建时间</th>
                <th width="200">操作</th>
            </tr>
        </thead>
        <tbody>
            {{# layui.each(d.list, function(index, item){ }}
            <tr>
                <td><input type="checkbox" name="checkbox" value="{{ item.id}}" lay-skin="primary"></td>

                <td data-list='{"key":"ids={{ item.id}}","filed":"category_no","render":"true"}'
                    data-params='{"url":"/education/admin/category/update/{{ item.id}}"}'>
                    {{item.category_no || ''}}
                </td>
                <td data-list='{"key":"ids={{ item.id}}","filed":"category_name","render":"true"}'
                    data-params='{"url":"/education/admin/category/update/{{ item.id}}"}'>
                    {{item.category_name}}
                </td>
                <td style="height: 30px">
                    {{# if(item.category_icon == null){ }} {{#  } else { }}
                    <img height="30px" src="/education{{item.category_icon || '' }}"/>
                    {{#  } }}
                </td>
                <td data-list='{"key":"ids={{ item.id}}","filed":"category_status","render":"true"}'
                    data-params='{"url":"/education/admin/category/update/{{ item.id}}"}'>
                    {{item.category_status == 1 ? '启用' : '禁用' }}
                </td>
                <td><input type="text" class="layui-input ajax-blur" name="category_ord"
                           value="{{ item.category_ord || '' }}"
                           data-params='{"url":"/education/admin/category/updateOrd/{{ item.id}}"}'> </td>
                <td>{{# if(item.createtime == null){ }} {{#  } else { }} {{ item.createtime}}  {{#  } }}</td>
                <td>

                    <button class="layui-btn layui-btn-mini" onclick="_edit('{{item.id}}');">
                        <i class="iconfont">&#xe653;</i>编辑
                    </button>
                    <button class="layui-btn layui-btn-mini" onclick="_subManage('{{item.id}}', '{{item.category_name}}');">
                        <i class="iconfont">&#xe653;</i>子类
                    </button>
                    <!--<button class="layui-btn layui-btn-mini layui-btn-normal modal-catch"
                            data-params='{"content":".add-subcat","area":"600px,400px","title":"【{{ item.category_name}}】的子类","subcat":"pid={{ item.id }}","type":"1"}'>
                        <i class="iconfont">&#xe649;</i>子类管理
                    </button>-->
                    <!--<button class="layui-btn layui-btn-mini layui-btn-danger ajax"
                            data-list='{"key":"id={{ item.id}}","msg":true,"render":"true","action":"del"}'
                            data-params='{"url": "/education/admin/category/delete","data":"ids={{ item.id}}", "method":"post", "confirm":"true"}'>
                        <i class="iconfont">&#xe626;</i>删除
                    </button></td>-->
                </td>
            </tr>
            {{# }); }}
        </tbody>

    </table>
</script>